package eu.webhib.frmwrk.dao.intf;

import java.util.List;

import eu.webhib.frmwrk.domain.intf.BaseEntity;

//
public interface BaseDao<T extends BaseEntity> {

   T createNew();

   void persist(T entity);

   T update(T entity);

   void delete(T entity);

   void deleteAll();

   T findById(Long id);

   List<T> findByNamedQuerySuffix(String queryNameSuffix, Object... paramValue);

   List<T> findByAttribute(String attrName, Object attrValue);

   List<T> findAll();

   List<T> findAllRange(int startIndex, int size);

   int count();
}
